-
Notifications
You must be signed in to change notification settings - Fork 41
Allow joining FETCH for PUBLISH and SUBSCRIBE_UPDATE forward=1 #1335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This also restricts joining fetch to subscriptions in Forward State=1, since joining a subscription in Forward State 0 does not have the intended "no gaps" effect.
This means that subscriptions initiated in Forward=0 need to update the join point when Forward transitions to 1. Possible flow:
```
P->S: PUBLISH, Forward=0, Largest Object={10, 5}
P: Object 11,0
S->P: PUBLISH_OK, Forward=1
S->P: Joining FETCH
P->S: FETCH_OK, End=11,0 (inclusive)
P->S (fetch stream): 11,0
P->S (subscribe stream): Object 11,1
```
Note in the above flow, a standalone FETCH to Largest Object would miss 11,0.
This PR also allows re-joining a track that was temporarily in Forward=0:
```
S->P: SUBSCRIBE, Forward=1
S->P: Joining FETCH
...
S->P: SUBSCRIBE_UDPATE, Forward=0
...
S->P: SUBSCRIBE_UDPATE, Forward=1
S->P: Joining FETCH
P->S: REQUEST_OK, Largest={21,0}
P->S (fetch stream): Object 21,0
```
Co-authored-by: Suhas Nandakumar <[email protected]> Co-authored-by: Ye-Kui Wang <[email protected]>
|
Based on my initial review, I think this PR looks sensible and it's definitely a use case worth solving, but this feels bad. |
| * Joining Request ID: The Request ID of the `Established` subscription to be | ||
| joined. If a publisher receives a Joining Fetch with a Request ID that does | ||
| not correspond to an existing Subscribe in the same session, it MUST return | ||
| not correspond to an `Established` subscription in the same session, it MUST return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some other states are valid. Pending (subscriber)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in #1363
This also restricts joining fetch to subscriptions in Forward State=1, since joining a subscription in Forward State 0 does not have the intended "no gaps" effect.
This means that subscriptions initiated in Forward=0 need to update the join point when Forward transitions to 1. Possible flow:
Note in the above flow, a standalone FETCH to Largest Object would miss 11,0.
This PR also allows re-joining a track that was temporarily in Forward=0:
Addresses an issue raised in #1313